package com.example.dbcms.component;

import com.example.dbcms.utils.DateUtil;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * 自定义组件
 */
@Component
public class MyComponent {

    Logger logger =LoggerFactory.getLogger(MyComponent.class);

    public MyComponent(){
        logger.info("输出了当前系统日期"+DateUtil.getCurrentDate());
        System.out.println("当前系统日期是======================"+DateUtil.getCurrentDate());
    }
}
